package tag

import (
	"context"
	"zuhao-seucre/internal/dao"
	"zuhao-seucre/internal/enums"
	"zuhao-seucre/internal/model/do"
	"zuhao-seucre/internal/service"
)

type sTag struct {
}

func New() *sTag {
	return &sTag{}
}

func init() {
	service.RegisterTag(New())

}
func (s *sTag) GetAccountTagCount(ctx context.Context, resourceType enums.ResourceType) int {
	count, _ := dao.TTagTree.Ctx(ctx).Where(do.TTagTree{
		Type: resourceType,
	}).Count()

	return count
}
